<?php
class User_feedback_model extends BZ_Model
{
    protected $table    = 'user_feedback';
    protected $table_2  = 'user';
    
    public function page_list($page_num, $num,$param)
    {
        $this->db->select('a.*,b.alias_name');
        $this->db->from($this->table.' as a');
        $this->db->join($this->table_2.' as b','a.uid = b.uid');
        if (!empty($param['provider_id'])){
            $this->db->where('a.provider_id',$param['provider_id']);
        }
        if (!empty($param['type'])){
            $this->db->where('a.type',$param['type']);
        }
        if (!empty($param['mobile'])){
            $this->db->like('a.mobile',$param['mobile']);
        }
        if (!empty($param['email'])){
            $this->db->like('a.email',$param['email']);
        }
        $this->db->limit($page_num,$num);
        $this->db->order_by('create_time','desc');
        return $this->db->get();
    }
}